<template>
	<view class="warp">
		<uv-status-bar></uv-status-bar>
		<!-- 顶部 start -->
		<uv-navbar leftText="返回" :fixed="false" title="内容详情" border :safeAreaInsetTop="false" :placeholder="true" @leftClick="jumpUrl('1','navigateBack')" @rightClick="jumpUrl('/pages/article/index','redirectTo')">
			<template v-slot:left>
				<view class="uv-nav-slot">
					<uv-icon name="arrow-left" size="19"></uv-icon>
				</view>
			</template>
			<template v-slot:right>
				<view class="uv-nav-slot">
					<uv-icon name="list-dot" size="19"></uv-icon>
				</view>
			</template>
		</uv-navbar>
		<!-- 顶部 end -->
		<!-- 详情 start -->
		<view class="content_box">
			<view class="title">
				{{row.title}}
			</view>
			<view class="other_box">
				<view class="time">
					<uv-icon name="calendar" color="#8c8c8c" size="24"></uv-icon>
					{{row.createtime_text}}
				</view>
				<view class="num">
					<uv-icon name="eye" color="#8c8c8c" size="24"></uv-icon>
					阅读 {{row.click}}
				</view>
			</view>
			<view class="content">
				<uv-parse :content="row.content"></uv-parse>
			</view>
		</view>
		<!-- 详情 end -->
		<!-- 底部tabbar start -->
		<bastTabbar :tabbar_index="1000"></bastTabbar>
		<!-- 底部tabbar end -->
	</view>
</template>

<script>
	import bastTabbar from '@/component/base-tabbar.vue'
	export default {
		components: {
			bastTabbar,
		},
		onLoad(options) {
			this.id = options.id
			this.show()
		},
		data() {
			return {
				id: '',
				row: {},
			}
		},
		methods: {
			async show() {
				const res = await this.$myRequest({
					url: "article/details",
					type: "post",
					data: {id:this.id}
				});
				if(res.code){
					this.row = res.data
				}
			},
		}
	}
</script>

<style lang="scss">
	.warp{
		background-color: #FFF;
		min-height: 100vh;
		max-width: 1600rpx;
		margin: auto;
		// 详情
		.content_box{
			padding: 20rpx;
			.title{
				font-size: 32rpx;
				font-weight: bold;
				margin-top: 20rpx;
			}
			.other_box{
				display: flex;
				.time{
					display: flex;
					color: #8c8c8c;
					margin-top: 20rpx;
					margin-right: 20rpx;
				}
				.num{
					display: flex;
					color: #8c8c8c;
					margin-top: 20rpx;
				}
			}
			.content{
				margin-top: 20rpx;
			}
		}
		
	}
</style>